package com.ushine.design.design.c_behavioral_pattern.c_interpreter.b_example;

/**
 * 非终结符表达式：And节点类
 *
 * @author yls
 */
public class AndNode extends AbstractNode {

    private AbstractNode left;
    private AbstractNode right;

    public AndNode(AbstractNode left, AbstractNode right) {
        this.left = left;
        this.right = right;
    }

    //And表达式解释操作
    @Override
    public String interpret() {
        return left.interpret() + "再" + right.interpret();
    }

}
